package test.main;

import junit.framework.Assert;
import monopd.Monopd;

import org.junit.Test;

public class Isolated_Test_Shutdown extends Test_Startup
{
	
	@Test
	public void test_kill_monopd() throws Exception
	{
		// kill server
		monopd.stop();
		
		// wait for monopd to die
		Thread.sleep( 500 );
		
		// test whether kill worked
		synchronized( Monopd.class )
		{
			Assert.assertNull( "monopd shutdown failed. process is still active!", monopd.getProcess() );
		}
	}

	@Override
	public void chat(int playerId, String author, String message)
	{
		// TODO Auto-generated method stub
	}
	@Override
	public void clientInfo(int playerId, String cookie)
	{
		// TODO Auto-generated method stub
	}
	@Override
	public void errorAdded(String message)
	{
		// TODO Auto-generated method stub
	}
	@Override
	public void infoAdded(String message)
	{
		// TODO Auto-generated method stub
	}
	@Override
	public void serverVersion(String version)
	{
		// TODO Auto-generated method stub
	}
	@Override
	public void xml(String message)
	{
		// TODO Auto-generated method stub
	}
	

}
